using System;
using UnityEngine;
using UnityEngine.UI;

namespace Gameplay.PVE
{
    public class PveCameraEditor : MonoBehaviour
    {
        public Slider fovSlider;
        private Text fovText;

        public Slider distanceSlider;
        private Text distanceText;

        public Slider angleSlider;
        private Text angleText;


        private void Start()
        {
            fovText = fovSlider.GetComponentInChildren<Text>();
            fovSlider.onValueChanged.AddListener(fovValue =>
            {
                //PveCameraManager.Instance.FieldOfView = fovValue;
                fovText.text = "Fov: " + fovValue;
            });
            fovSlider.maxValue = 60;
            fovSlider.minValue = 1;
            //fovSlider.value = PveCameraManager.Instance.FieldOfView;
            
            distanceText = distanceSlider.GetComponentInChildren<Text>();
            distanceSlider.onValueChanged.AddListener(fovValue =>
            {
                //PveCameraManager.Instance.FollowDistance = fovValue;
                distanceText.text = "Distance: " + fovValue;
            });
            distanceSlider.maxValue = 5;
            distanceSlider.minValue = 0;
            //distanceSlider.value = PveCameraManager.Instance.FollowDistance;
            
            angleText = angleSlider.GetComponentInChildren<Text>();
            angleSlider.onValueChanged.AddListener(fovValue =>
            {
                //PveCameraManager.Instance.Angle = fovValue;
                angleText.text = "YHeight: " + fovValue;
            });
            angleSlider.maxValue = 5;
            angleSlider.minValue = 0;
            //angleSlider.value = PveCameraManager.Instance.Angle;
        }
        
    }
}